package com.example.videoproject.utils;

/**
 * 将数据统一格式封装返回给前端
 */

public class Result {
    private Integer code;    //增删改查对应的操作码，便于前端识别是什么操作
    private Object data;     //返回的数据统一格式封装
    private String message;  //操作所需要返回的信息

    public Result() {
    }

    public Result(Integer code, Object data) {
        this.code = code;
        this.data = data;
    }

    public Result(Integer code, Object data, String message) {
        this.code = code;
        this.data = data;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
